Integrand size = 23, antiderivative size = 217 \[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=-\frac {b \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{a \left (a^2-b^2\right ) d}-\frac {\sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{\left (a^2-b^2\right ) d}+\frac {\left (3 a^2-b^2\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a (a-b) (a+b)^2 d}+\frac {b^2 \sqrt {\sec (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (b+a \sec (c+d x))} \]
[Out]
Time = 0.47 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {3317, 3930, 4191, 3934, 2884, 3872, 3856, 2719, 2720} \[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\frac {b^2 \sin (c+d x) \sqrt {\sec (c+d x)}}{a d \left (a^2-b^2\right ) (a \sec (c+d x)+b)}-\frac {\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d \left (a^2-b^2\right )}-\frac {b \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a d \left (a^2-b^2\right )}+\frac {\left (3 a^2-b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right )}{a d (a-b) (a+b)^2} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3317
Rule 3856
Rule 3872
Rule 3930
Rule 3934
Rule 4191
Rubi steps \begin{align*} \text {integral}& = \int \frac {\sec ^{\frac {5}{2}}(c+d x)}{(b+a \sec (c+d x))^2} \, dx \\ & = \frac {b^2 \sqrt {\sec (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (b+a \sec (c+d x))}+\frac {\int \frac {-\frac {b^2}{2}-a b \sec (c+d x)+\frac {1}{2} \left (2 a^2-b^2\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (b+a \sec (c+d x))} \, dx}{a \left (a^2-b^2\right )} \\ & = \frac {b^2 \sqrt {\sec (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (b+a \sec (c+d x))}+\frac {\int \frac {-\frac {b^3}{2}-\frac {1}{2} a b^2 \sec (c+d x)}{\sqrt {\sec (c+d x)}} \, dx}{a b^2 \left (a^2-b^2\right )}+\frac {\left (3 a^2-b^2\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x)}{b+a \sec (c+d x)} \, dx}{2 a \left (a^2-b^2\right )} \\ & = \frac {b^2 \sqrt {\sec (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (b+a \sec (c+d x))}-\frac {\int \sqrt {\sec (c+d x)} \, dx}{2 \left (a^2-b^2\right )}-\frac {b \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx}{2 a \left (a^2-b^2\right )}+\frac {\left (\left (3 a^2-b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 a \left (a^2-b^2\right )} \\ & = \frac {\left (3 a^2-b^2\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a (a-b) (a+b)^2 d}+\frac {b^2 \sqrt {\sec (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (b+a \sec (c+d x))}-\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 \left (a^2-b^2\right )}-\frac {\left (b \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 a \left (a^2-b^2\right )} \\ & = -\frac {b \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{a \left (a^2-b^2\right ) d}-\frac {\sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{\left (a^2-b^2\right ) d}+\frac {\left (3 a^2-b^2\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a (a-b) (a+b)^2 d}+\frac {b^2 \sqrt {\sec (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (b+a \sec (c+d x))} \\ \end{align*}
Time = 5.34 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.37 \[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\frac {\frac {2 a b^2 \sin (c+d x)}{\left (a^2-b^2\right ) (a+b \cos (c+d x)) \sqrt {\sec (c+d x)}}+\frac {\cot (c+d x) \left (a b \sec ^{\frac {3}{2}}(c+d x)+a b \cos (2 (c+d x)) \sec ^{\frac {3}{2}}(c+d x)-a b \sec ^{\frac {7}{2}}(c+d x)-a b \cos (2 (c+d x)) \sec ^{\frac {7}{2}}(c+d x)+2 a b E\left (\left .\arcsin \left (\sqrt {\sec (c+d x)}\right )\right |-1\right ) \sqrt {-\tan ^2(c+d x)}+2 \left (2 a^2-a b-b^2\right ) \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\sec (c+d x)}\right ),-1\right ) \sqrt {-\tan ^2(c+d x)}-6 a^2 \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\sqrt {\sec (c+d x)}\right ),-1\right ) \sqrt {-\tan ^2(c+d x)}+2 b^2 \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\sqrt {\sec (c+d x)}\right ),-1\right ) \sqrt {-\tan ^2(c+d x)}\right )}{(a-b) (a+b)}}{2 a^2 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(611\) vs. \(2(281)=562\).
Time = 4.03 (sec) , antiderivative size = 612, normalized size of antiderivative = 2.82
method | result | size |
default | \(-\frac {\sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-\frac {2 b^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{a \left (a^{2}-b^{2}\right ) \left (2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b \right )}-\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{a \left (a +b \right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}-\frac {b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\left (a^{2}-b^{2}\right ) a \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}+\frac {b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\left (a^{2}-b^{2}\right ) a \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}-\frac {6 a b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \Pi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), -\frac {2 b}{a -b}, \sqrt {2}\right )}{\left (a^{2}-b^{2}\right ) \left (-2 a b +2 b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}+\frac {2 b^{3} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \Pi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), -\frac {2 b}{a -b}, \sqrt {2}\right )}{a \left (a^{2}-b^{2}\right ) \left (-2 a b +2 b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(612\) |
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\int \frac {\sqrt {\sec {\left (c + d x \right )}}}{\left (a + b \cos {\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\int { \frac {\sqrt {\sec \left (d x + c\right )}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\int { \frac {\sqrt {\sec \left (d x + c\right )}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {\sec (c+d x)}}{(a+b \cos (c+d x))^2} \, dx=\int \frac {\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
[In]
[Out]